import { ExtractPropTypes } from 'vue'

export const paginationProps = {
  pageNum: {
    type: Number,
    default: 1
  },
  pageSize: {
    type: Number,
    default: 10
  },
  total: {
    type: Number,
    default: 0
  },
  listSize: {
    type: Number,
    default: 10
  },
  selectOptions: {
    type: Array,
    default: () => [10, 20, 30, 40]
  },
  showSelectOptions: {
    type: Boolean,
    default: true
  }
}

export type PaginationProps = ExtractPropTypes<typeof paginationProps>

export const paginationEmit = ['click', 'changeSize']

export type PaginationEmit = typeof paginationEmit

export type PageList = {
  pageNum: number
  pageIndex: number
  displayText: string
}
